<template>
  <div>
    <h1>WebSocket Client</h1>
    <button @click="connect">连接服务器</button>
    <button @click="disconnect">断开连接</button>
  </div>
</template>

<script>
import WebSocketClient from './websocket.js';

const client = new WebSocketClient();

export default {
  methods: {
    connect() {
      client.connect();
    },
    disconnect() {
      client.disconnect();
    },
  },
};
</script>
